package com.tyk.bookstore.back.message.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tyk.bookstore.back.message.model.enume.NoticeState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author tyk
 * @description 服务公告
 */
@Schema(name = "ServiceNoticeDo", description = "服务公告")
@Data
@TableName("service_notice")
public class ServiceNoticeDo  implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;


    @Schema(description = "ID")
    @TableId(value = "id")
    private Long id;

    @Schema(description = "发布者ID")
    @TableField("user_id")
    private Long userId;

    @Schema(description = "标题")
    @TableField("title")
    private String title;

    @Schema(description = "内容")
    @TableField("content")
    private String content;

    @Schema(description = "署名")
    @TableField("signature")
    private String signature;

    @Schema(description = "状态[0未发布,1已发布]")
    @TableField("state")
    private NoticeState state;

    @Schema(description = "发布时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;
}
